package com.woniuxy.userapp.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.commons.util.Result;
import com.woniuxy.userapp.client.param.*;
import com.woniuxy.userapp.infra.model.mapper.model.FrontAccount;
import com.woniuxy.userapp.infra.model.mapper.model.dto.GetRoleListDto;
import com.woniuxy.userapp.service.dto.ChangeAccountMoneyDto;
import com.woniuxy.userapp.service.dto.UserDto;
import org.springframework.web.HttpRequestMethodNotSupportedException;

import java.text.ParseException;
import java.util.List;


/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 
 * @since 2022-08-03
 */
public interface FrontAccountService extends IService<FrontAccount> {

    //根据用户名查询前段用户数据
    UserDto loadUserByUsername(String userName);

    //根据id获取其角色权限集合
    List<GetRoleListDto> getRoleList(Integer id) throws ParseException;

    /**
     * 根据id,余额,修改此账户余额
     * @param changeMoneyInfo
     */
    void changeMoney(ChangeAccountMoneyInfo changeMoneyInfo);

    /**
     *
     * @param autoDeductMoneyInfo
     */
    void autoDeductMoney(AutoDeductMoneyInfo autoDeductMoneyInfo);

    /**
     * 注册
     * @param registerInfo
     */
    void register(RegisterInfo registerInfo);

    /**
     * 前天登录
     * @param username
     * @param password
     */
    Result login(String username, String password) throws HttpRequestMethodNotSupportedException;

    /**
     * 商家教练提现
     * @param depositInfo
     */
    void deposit(DepositInfo depositInfo);

    void recharge(RechargeInfo rechargeInfo);
}
